package cn.cdeden.sys.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;

/**
 * @ProjectName : ecm_hou
 * @Package : com.cdyd.ecm.core.sys.enums
 * @ClassName : SysConfigDefaultEnums
 * @Author : Yu.
 * @Description : // 系统设置默认属性
 * @Date : 2023/2/10 9:29
 * @Version : 1.0
 */
@Getter
@AllArgsConstructor
public enum SysConfigDefaultEnums {

    companyName("companyName", "公司名称"),
    companyAbbreviation( "companyAbbreviation", "公司简称"),
    companyNameEn( "companyNameEn", "公司英文名称"),

    sysName( "sysName", "系统名称"),

    pageLogo("pageLogo", "首页头部Logo"),

    pageTitle( "pageTitle", "页面Title"),

    logoLabel( "logoLabel", "浏览器展示Logo"),
    serverAddress("serverAddress", "服务器地址"),

    copyrightInfo("copyrightInfo", "版权信息"),

    userDefaultPassword ( "userDefaultPassword", "用户默认密码"),
    passwordHint( "passwordHint", "密码输入校验提示语"),

    passwordStrategy ("passwordStrategy", "密码策略正则表达式"),



    LoginCodeEnabled("LoginCodeEnabled","登录是否开启验证码"),

    loginSingle("loginSingle","是否限制单用户登录"),

    loginRenew("loginRenew","续期时间范围"),
    loginDetect("loginDetect","续期检查时间范围"),
    loginTokenValidityInSeconds("tokenValidityInSeconds","令牌过期时间"),



    LoginWay ("LoginWay", "登录方式"),


    wenXingYiYanid("wenXingYiYanid","文兴一言ID"),

    wenXingYiYanSecret("wenXingYiYanSecret","文兴一言服务"),
    fileSizeLimit("fileSizeLimit","文件上限制"),
    fileFormat("fileFormat","文件格式"),
    HELP_URL("help_url","帮助中心链接"),

    file_versions_size("file_versions_size","文件历史版本上线限制"),



    wx_login_status("wx_login_status","微信登录状态"),
    ad_domain_status("ad_domain_status","企业AD域登录状态"),

    OAuth_enable("OAuth_enable","OAuth集成"),
    ad_domain_ou("ad_domain_ou","ou"),








    ;

//    @ApiModelProperty(value = "系统配置编号")
    private final String configCode;
//    @ApiModelProperty(value = "系统配置名称")
    private final String configName;

    public static SysConfigDefaultEnums find(String configCode) {
        for (SysConfigDefaultEnums enums : SysConfigDefaultEnums.values()) {
            if (StringUtils.equals(enums.getConfigCode(), configCode)) {
                return enums;
            }
        }
        return null;
    }



}
